package plugins.detail;

import kd.bos.form.CloseCallBack;
import kd.bos.form.FormShowParameter;
import kd.bos.form.ShowType;
import kd.bos.form.control.events.ItemClickEvent;
import kd.bos.list.plugin.AbstractListPlugin;
import kd.sdk.plugin.Plugin;

import java.util.EventObject;

public class ShouCangRefresh extends AbstractListPlugin implements Plugin {

    @Override
    public void itemClick(ItemClickEvent evt) {
        super.itemClick(evt);
        if ("dcb4_shoucangrefresh".equalsIgnoreCase(evt.getItemKey())) {
            // 先打开新页面
            FormShowParameter showParameter = new FormShowParameter();
            showParameter.setFormId("dcb4_merchantdata");
            showParameter.getOpenStyle().setShowType(ShowType.NewTabPage);
            showParameter.setCustomParam("Model", "shoucang");
            this.getView().showForm(showParameter);

            // 再关闭当前页面
            this.getView().close();
        }
    }

}
